package com.gd.deron.smartrobot.baobao.app;

import com.baidu.mapapi.SDKInitializer;
import com.gd.deron.smartrobot.baobao.crash.CrashHandler;
import com.gd.deron.smartrobot.baobao.hci.HciCloudTtsHelper;
import com.gd.deron.smartrobot.baobao.service.BluetoothBleService;
import com.gd.deron.smartrobot.baobao.service.LocationService;
import com.gd.deron.smartrobot.baobao.service.SerialPostService;
import com.gd.deron.smartrobot.baobao.service.WakeService;
import com.gd.deron.smartrobot.baobao.wifi.SocketClient;
import com.gd.deron.smartrobot.baobao.wifi.SocketServer;
import com.gd.deron.smartrobot.baobao.wifi.WifiHotManager;

import android.app.Application;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import cn.wch.ch34xuartdriver.CH34xUARTDriver;

public class MyApplication extends Application {
	public static String fromTranslate = "";
	public static String toTranslate = "";
	public static String contentTranslate = "";
	public static String SINGER;
	public static String MUSIC_NAME;
	public LocationService locationService;
	public static String ANSWERANDQUESTION = null;
	public static BluetoothBleService bleService;
	public static WakeService wakeService;
	public static BluetoothAdapter mBluetoothAdapter;
	public static String device_address = null;
	public static BluetoothDevice myDevice = null;
	public static boolean isConnect = false;
	public  static MyApplication mAPP= null;
	public static String ASR;
	public SocketServer server;

	public SocketClient client;

	public WifiHotManager wifiHotM;
	
	public static String MESSAGE = null;
	public static HciCloudTtsHelper mHciCloudTtsHelper;
	public static boolean initTTSResult = false;
	
	public static CH34xUARTDriver driver;// 需要将CH34x的驱动类写在APP类下面，使得帮助类的生命周期与整个应用程序的生命周期是相同的
	public static SerialPostService mPostService;
	@Override
	public void onCreate() {
		super.onCreate();
		mAPP = this;
		
		//保存crash到本地
		CrashHandler.getInstance().init(this);
		locationService = new LocationService(this);
        SDKInitializer.initialize(this);  
	}
}
